package com.wksc.framework.impexp.reader;

import java.io.IOException;

import com.wksc.framework.impexp.constants.PostfixType;
import jxl.read.biff.BiffException;


/**
 * <p> Title(文件名): ${file_name} </p>
 * <p> Description(描述): ${todo} </p>
 * <p> Copyright(版权): Copyright (c) ${year} </p>
 * <p> Company(公司): 成都四方信息技术有限公司 </p>
 * <p> CreateTime(生成日期)：11-11-13下午3:33 </p>
 *
 * @author wanglei
 * @version ${project_name}
 */
public class ReaderFactory {
    public static Reader getReader(PostfixType postfix) throws BiffException, IOException {
        Reader reader;
        switch (postfix) {
            case XLS:
                reader = new XlsReader();
                break;
            case CSV:
                reader = new CsvReader();
                break;
            case TXT:
            	reader = new TxtReader();
            	break;
            default:
                reader = new XlsReader();
        }

        return reader;
    }
}
